<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let p = new Promise((resolve, reject) => {
            resolve('dsfdsa')
        })
            .then(v => {
                console.log(v)
                return new Promise((resolve, reject) => {
                    resolve('yahoo')
                })
            }, error => console.log(error))
            .then(v=>console.log(v))

        // console.log(p)
        console.log('fsadf')
        // setTimeout(() => console.log(p), 1000)
    </script>
</body>

</html>